/*
**    Copyright (C) 2003-2011 Institute for Systems Biology
**                            Seattle, Washington, USA.
**
**    This library is free software; you can redistribute it and/or
**    modify it under the terms of the GNU Lesser General Public
**    License as published by the Free Software Foundation; either
**    version 2.1 of the License, or (at your option) any later version.
**
**    This library is distributed in the hope that it will be useful,
**    but WITHOUT ANY WARRANTY; without even the implied warranty of
**    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
**    Lesser General Public License for more details.
**
**    You should have received a copy of the GNU Lesser General Public
**    License along with this library; if not, write to the Free Software
**    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
*/

package org.systemsbiology.tsv;

import java.io.Serializable;

/**
 * Defines a single data field in a given stream
 *
 *  This can be absolutely anything, as long as it can be packaged as a heap representation. Field serves no other
 *  purpose than to provide an encapsulated wrapper around the data, allowing for specification of data types that are
 *  late-bound at runtime, always Comparable, and always Serializable.
 *
 * @author trobinso
 */
public interface Field<T extends Comparable<T> & Serializable> extends Comparable<Field<T>>,Serializable {

    /*
     * Suggested constructor
     *  Allows for the specification of the contents of this implementer of Field at construction time

    public Field(T contents);
     */

    /**
     * Set the contents of an implementer of {@link Field}
     * @param contents T contents for this field
     */
    public void setContents(T contents);

    /**
     * Get the contents from an implementer of {@link Field}
     * @return T contents of this field
     */
    public T getContents();
}
